<template>
  <div>
    <h1>自增</h1>
    <h1>点击事件</h1>
    <button @click="AddNum">AddNum:{{ count }}</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: 0,
    };
  },
  methods: {
    AddNum() {
      this.count++;
    },
  },
  mounted() {
    console.log(this.count);
  },
};
</script>

<style scoped>
</style>